package com.hsj.springai.utils;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class GlobExceptionHandler {

    @ExceptionHandler(GlobException.class)
    public String handlerExc(GlobException globException){
        return "全局异常处理，返回给前端信息："+globException.getCode()+globException.getMessage();
    }
}
